You can find the names of revealed cards (graveyard, on the play field, and in your hand) in memory. Each card in memory has a "Zone" saying where it is... so you can tell what's on the board, or what's in the graveyard, etc.
(Before anyone gets their hopes up, yes the first few cards on the top of your deck are also in memory... but with the name/text of "Unrevealed Card" or something... so you can't snoop :P)
In terms of "counting cards", the first obstacle may be knowing what cards are actually in your deck - I guess the bot/hack could monitor the "Crafting" screen to "learn" which cards you have (requiring you to manually go there first, before using a different deck) and then monitoring what's already been played. I'm not sure how to determine between your, and your opponent's, cards in memory though (which you'd obviously want to do, for correct stats of your deck).
I'm super busy with a bunch of other things, but have considered trying to write an auto-playing bot which could, in theory, determine which cards in your hand can be played, which cards on the playing field can be used to attack, what creatures your opponent has out (or more importantly which are taunters). It probably wouldn't be particularly good, but would help for those achievements where you need to cast X number of small creatures, or spells.
Realistically though: someone else please write the bot