The table of contents is automatically generated based on the chapters in the book. More correctly, it's based on the parts, chapters, sections, sub-sections, sub-sub-sections, etc.
You can choose whether to number your parts, chapters, sections and whether to use dots in the table of contents.
The way you enable numbering (e.g. 1, 1.1, etc) is in the "Section Numbering" section of a Custom theme. This is also where you choose whether to number parts, and whether the table of contents uses dots between the chapter or section name and the page number.
Custom themes are part of Standard and Pro plans, and can be enabled at Author > Books > your book > Settings > Book Theme
Your plan can be edited at https://leanpub.com/author_dashboard/subscriptions
Author subscriptions help pay for us to provide support, and one of the things that requires support is the custom themes, so we feel this is appropriate...