Show n files in each directory with tree command

tree as such does not have any options for this, but you can prevent it from printing files for directories with more than n entries:

$ tree /usr --filelimit 10
/usr
├── bin [3260 entries exceeds filelimit, not opening dir]
├── include [1110 entries exceeds filelimit, not opening dir]
├── lib [3700 entries exceeds filelimit, not opening dir]
├── lib32 [610 entries exceeds filelimit, not opening dir]
├── lib64 -> lib
├── local
│   ├── bin
│   │   ├── gpg1v -> /usr/bin/gpgv
│   │   └── vless
│   ├── etc
│   ├── games
│   ├── include
│   ├── lib
│   ├── man
│   ├── sbin
│   ├── share
│   │   └── man -> ../man
│   └── src
├── sbin -> bin
├── share [243 entries exceeds filelimit, not opening dir]
└── src

19 directories, 2 files