I have an list of numbers in a variable named x. Can you show me how to count the elements in the array, by printing out each element followed by a colon followed by a count? Like 4: 10 if 4 appears 10 times. I'm a Python programmer.

All I want is the code. You can use an example with x = [3, 5, 3, 3, 5, 1]

system
mere paas x naamak ek char main sankhyaon kii ek suchi he.kya aap mujhe dikhaa sakate hai ki sarani main tatwon kii ginati kaise karen, prayek tatv ko ek brihadantra ke baad ek ginati ke baad print karke?4: 10 kii tarah agar 4 10 baar dikhaai detaa he.main ek paythan programmer hum.

main bas code chahta hum.aap x = [3, 5, 3, 3, 5, 1] ke saath ek udhaaharan kaa upyog kar sakate hai
user
sangrah aayaat counter se
 
x = [3, 5, 3, 3, 5, 1]
 
ginati = counter (x)
 
n ke liye counts.keys () main:
  print (" %d: %d" %(n, gananaa [n]))
assistant
<|system|>
</s>
<|user|>
mere paas x naamak ek char main sankhyaon kii ek suchi he.kya aap mujhe dikhaa sakate hai ki sarani main tatwon kii ginati kaise karen, prayek tatv ko ek brihadantra ke baad ek ginati ke baad print karke?4: 10 kii tarah agar 4 10 baar dikhaai detaa he.main ek paythan programmer hum.

main bas code chahta hum.aap x = [3, 5, 3, 3, 5, 1] ke saath ek udhaaharan kaa upyog kar sakate hai</s>
<|assistant|>
sangrah aayaat counter se
 
x = [3, 5, 3, 3, 5, 1]
 
ginati = counter (x)
 
n ke liye counts.keys () main:
  print (" %d: %d" %(n, gananaa [n]))</s>
