Php Count Items In Array Javascript Length Of An Array