count images in img dir