userid = str(message.chat.id)
connection = sqlite3.connect('database.sqlite')
q = connection.cursor()
q.execute("select ref_count from users where Id =" + userid )
ref_count_message = str(q.fetchone())
print(ref_count_message)
q.close()
connection.close()