Finding the p, d, q values in ARIMA After differentiating a simulated time series once (verified through the ADF test that it is now stationary), I ran the auto.arima() function and it returned ARIMA(1,0,3). However, I thought that the way to find the p was to count the number of times lines crossed the dotted blue line in PACF?
I have the following ACF and PACF:


Also, should I change the d value to 1 since auto.arima() doesn't know I had to differentiate once?
 A: 
However, I thought that the way to find the p was to count the number of times lines crossed the dotted blue line in PACF?

This is wrong.
The following table summarizes the relevant properties of the (theoretical) acfs and pacfs of the ARMA models:

Note that in practice, "zero after lag..." means that the autocorrelations / partial autocorrelations (the vertical lines) stay within the two dotted blue lines ~95% of the time after such lag.
If the data are to be represented by an ARMA($p$,$q$) model with $p\ge1$ and $q\ge1$ then both the acf and the pacf should eventually die away geometrically (in general as a mixture of exponentials or damped sine waves) with neither exhibiting an obvious cutoff point.
If the acf dies away slowly, more or less linearly, and not geometrically then the data are not stationary and differencing is necessary. An ARIMA($p$,$d$,$q$) model with $d\ge1$ will be required. The data may be differenced once or more and the resulting acf and pacf examined to see if the differenced data appear to be stationary and amenable to being modelled as an ARMA process.

Also, should I change the d value to 1 since the auto.arima doesn't know I had to differentiate once?

Yes - or you could feed the original series to auto.arima and it should identify that $d=1$.
