myaddon/__init__.py in your add-ons folder:
Add-on Development
A Basic Add-on
Add the following to
Restart Anki, and you should find a ‘test’ item in the tools menu.
Running it will display a dialog with the card count.
If you make a mistake when entering in the plugin, Anki will show an
error message on startup indicating where the problem is.