There are multiple factors that define the number of nodes on a CAN bus network.
Various standards and applications dictate this number with trade-offs between the nodes, bus length and stub length.
Maximum speed on large networks may be limited by the number of nodes in a network, the type of cabling used, stub length, and other factors.
Bus length according to the ISO11898 is 40m, trade off between Bus length and Data rate can increase number of nodes.
Theoretically, a maximum of 167 nodes can be used. But due to other effects of voltage and other connections, the value should be less.