Alternatively, consider permutations of numbers made of one, two, three and four digits.
There is one number made of single number $1$, which is $1111$. Total number is:
$$1\cdot {4\choose 1}=4.$$
There are four numbers made of two digits $1$ and $2$, which are $1122,1221,2112,2211$. Total number is:
$$4\cdot {4\choose 2}=24.$$
There are four numbers made of three digits $1,2,3$, which are $1232,2123,2321,3212$. And there are two possible cases: $1,2,3$ and $2,3,4$. Total number is:
$$4\cdot 2=8.$$
There are eight numbers made of four digits $1,2,3,4$, which are $1234,1342,2134,2431,3241,3421,4213,4312$. Total number is:
$$8\cdot 1=8.$$
In conclusion, the grand total is:
$$4+24+8+8=44.$$