Number of threads running

Is there any command to find
1) the number of threads running
2) kernel boot mode
in solaris box

if theads = processes -> "ps -ef | wc -l"

what means "kernel boot mode"?

To find out the runlevel that you are currently in:

bash-3.00# who -r
   .       run-level 3  Jan 30 14:51     3      0  S

In Solaris 9 and earlier, the default runlevel is found in /etc/inittab

# cat /etc/inittab
ap::sysinit:/sbin/autopush -f /etc/iu.ap
ap::sysinit:/sbin/soconfig -f /etc/sock2path
fs::sysinit:/sbin/rcS sysinit           >/dev/msglog 2<>/dev/msglog </dev/console
is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
sS:s:wait:/sbin/rcS                     >/dev/msglog 2<>/dev/msglog </dev/console
...<snip>

In Solaris 10, this is determined in the Solaris Service Management Facility (SMF), but I haven't tried to change the default runlevel using anything other than init statements...

bash-3.00# svcs -a | grep milestone
online         Jan_30   svc:/milestone/name-services:default
online         Jan_30   svc:/milestone/devices:default
online         Jan_30   svc:/milestone/network:default
online         Jan_30   svc:/milestone/single-user:default
online         Jan_30   svc:/milestone/sysconfig:default
online         Jan_30   svc:/milestone/multi-user:default
online         Jan_30   svc:/milestone/multi-user-server:default