You do not want to count how many characters your text has, just count the height using:
h = [NSString stringWithFormat:@"%f", [post.text boundingRectWithSize:CGSizeMake(298.0f, CGFLOAT_MAX) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:[NSDictionary dictionaryWithObject:[UIFont fontWithName:@"Helvetica Neue" size:14.0] forKey: NSFontAttributeName] context:nil].size.height]
Use width for 298 and your font / font.
source share