Php Count Similar Items In Array Python Practice