Need help with counter circuit
I don't see enough information to offer any advice on the sensor. 

As far as detecting a count of 20, if you are sure that the counter will only count "up" you don't need to use a full comparator (such as two 74LS85s) but only need to 'AND' all the '1's in the desired count. In this case there is only a single 1, and that is bit 1 (QB) of the second counter. It will go high when a count of 20 is reached (and not before if the count starts at 00).