Added max record count parameter
Code review