The $num_chains() method returns the number of chains in a
CmdStanMCMC object or the number of chains used for standalone
generated quantities in a CmdStanGQ object.
Examples
# \dontrun{
fit_mcmc <- cmdstanr_example(chains = 2)
fit_mcmc$num_chains()
#> [1] 2
# }