Added a function to check whether key-value pair is not more than 10