• Why not use the built in validation? It has options to do a fast count as well as a checksum, and it understands whatever filters are in place.