Avoid checking type of count, use -1 as "not found".
Merge pull request #13 from nelchael/master

Use -1 for "not found"