Understanding how many biases are there in a neural network?
The sources are both correct, they implement bias in different ways, and are counting slightly different things:


Your first source implements a separate bias vector in each output layer in addition to the weights, and is referring to the dimension of the bias vector when it is counting biases.
Your second source implements bias as both a separate fixed value $1.0$ in each input layer, and a larger weights matrix with an extra column containing the actual learned bias value. It is referring to the extra added value in each layer when counting the "biases" - more accurately it is counting the added bias "signals" and not the learned bias values, because the learned bias values are implemented inside the weights matrix when using this approach.


In both cases, the number of learned values added due to bias are the same, and are the same as this:


  the answer of the first should be 5 and for the second 4 + 3. Each neuron except for in the input-layer has a bias


In the second case the equivalent values appear in weight matrices as extra columns. It's really just an implementation difference. By adding a fixed bias signal to inputs, it simplifies the learning update for each layer to occur to only one matrix, as opposed to a matrix plus a separate bias vector (requiring different update rules for each). This is at the expense of needing to manipulate the inputs each time, and there is no great difference between the approaches in terms of efficiency. Some libraries take one approach, some take the other.