add script to count records