stop casting count as int when it might contain letters
added http request compatibility check