First of all, in bitcoin and subsequently in every other blockchain nonce
is shortcut for nonsense. It does not make any sense to the block data but it is there. Lets see why is it there?
A Block basically should have
1) Previous block hash, and
2) List of transactions to be mined in that block
With these values no matter how many times you calculate the block hash it will always be the same. And that hash might not be a valid hash. The only way to get different hash is by changing some data in the block.You cannot change Previous hash
or transaction data
but you can insert new transactions in your list or remove some of them or use different set of transactions. But, this is inefficient to do every time because the goal is to find a valid block hash faster than others. Inefficient because to insert a new transaction into that list you have to first verify the transaction.
Therefore, you introduce a random variable in the block whose sole purpose is to help generate a new block hash. This variable is called nonce. Now, the block structure changes to following:
1) Previous hash
2) List of Trasactions
3) Nonce
Now, you calculate block hash based on these data. If your hash is invalid again, you choose a different nonce and try again repeatedly unless you get a valid block hash.
You can clearly see Nonce
can be any data randomly selected. It can be anything, number, string, bytes, anything but for simplicity you chose it to be a number with initial value 1. This ease you to quickly calculate a hash because now you do not have to take a random value but increase the nonce by 1 and hash the block again.
Account Nonce
Conceptually it is same as block nonce. Block Nonce is used to differ the block hash, account nonce is used to differ the transaction hash. And since transaction count from an account is always in an increasing order (unique), lets use this value as Account Nonce.