.......... [ZBX-8784] created dev brach
........S. [ZBXNEXT-2462] fixed sql query for time and count based database requests, 
                          fixed range calculation for coun based requests,
                          renamed *count_in_time to *time_and_count functions so the
                          names better reflect parameter order