add record count query to gateway interface
Merge branch '16October2014Milestone' of https://github.com/USM-RCG/openhds-tablet into 16October2014Milestone