How many SME/PE account required to configure IP PBX?

Pls. advise if we need to program 4 accounts (SME) if the IP-PBX have 4 outgoing/incoming lines with us, or we can do one account that all will be record on same trunk?

Both ways will work. It depends from what you want to achieve.

If you need incoming calls: Diamond DID->IP PBX then you need 4 SME accounts.

If you only going to make calls IP PBX -> Diamond, you may use one account.

If you want to separate billing records and track every line you need 4 account. If you don't care about it - one account will work too.

If you'll use one account don't forget to turn on simultaneous calls, so two lines could work simultaneously.