Try to fix no implicit conversion of String into Integer error when comparing number of elements found.