message_count = {}
@bot.message_handler(commands=['statiks'])
def send_message_count(message):
user_id = message.from_user.id
if user_id in message_count:
message_count[user_id] += 1
else:
message_count[user_id] = 1
bot.reply_to(message, "Вы отправили {}сообщений".format(message_count[user_id]))
type(message_count)
print(message_count)