added count check for dataSource for objects that implement array interface count