Added count variable which stores returned rows count