added script to gather statistics to compare between source and intermediate databases